/*
 * @Author: 何 海深 813936564@qq.com
 * @Date: 2023-11-30 20:12:44
 * @LastEditors: 何 海深 813936564@qq.com
 * @LastEditTime: 2024-01-27 19:14:47
 * @FilePath: \vue-project\src\api\modules\userApi.ts
 * @Description: 系统中用户操作
 */
import { request } from '@/utils/https/asiox'
import { userUrl } from '../url'
export default {
  // 获取用户信息
  getUserInfo: (data?: any) => {
    return request({
      url: userUrl.getUserInfoUrl,
      data,
      method: 'get'
    })
  },
  // 是否已经登录
  getIsAuthed: (data?: any) => {
    return request({
      url: userUrl.isAuthed,
      data,
      method: 'post'
    })
  },
  login: (data?: any) => {
    return request({
      url: userUrl.login,
      data,
      method: 'post'
    })
  },
  // 退出系统
  loginOut: (data?: any) => {
    return request({
      url: userUrl.logOut,
      data,
      method: 'post'
    })
  },
  // 获取用户关联企业信息
  /*   getUserEnterprise: (data?: any) => {
    return request({
      url: userUrl.getUserEnterprise,
      data,
      method: 'post'
    })
  }, */
  //公共字典
  findDictData: (data?: any) => {
    return request({
      url: userUrl.findDictData + `/${data}`,
      method: 'get'
    })
  }
}
